<ul title="<%= @panel_title || "Spendy! Expense Listing" %>" selected="true">

  <% flash.each do |key,value| %>
  <li class="flash"><span class="flash_<%= key %>"><%= value %></span></li>
  <% end -%>

  <% bins = get_date_bins_for_expenses(@expenses) -%>
  <% bins.each do |bin, expenses| -%>
    <li class="group"><%=h bin %></li>
    <% expenses.each do |expense| -%>
	  <%
	    link_text  = "<small>[$" + expense.amount.to_s + "]</small> " + expense.description
        link_text += (!expense.location.blank?) ? " / " + expense.location : ""
	  %>
      <li><%= link_to link_text, :action => "show", :id => expense %></li>
    <% end -%>
  <% end -%>

</ul>
